public class Demo {

}
class Solution {
    public long findTheArrayConcVal(int[] nums) {
        long ans = 0;
        int left = 0, right = nums.length-1;
        while(left<right){
            String s1 = Integer.toString(nums[left]);
            String s2 = Integer.toString(nums[right]);
            ans += Integer.parseInt(s1+s2);
            left++;
            right--;
        }
        if(left == right)
            ans += nums[left];
        return ans;
    }
}
